<!DOCTYPE html>
<html>
<head>
    {include file="../application/common/header.html" /}
</head>

<body>
    <table id="teacher_group_managedg">
        <thead>
            <tr>
                <th data-options="field:'ID',checkbox:true">ID</th>
                <th data-options="field:'ab',title:'模块id',formatter:function(value,row,index){
                    return row.ID;
                }"></th>
                <th data-options="field:'GROUP_NAME',title:'组名',width:20,editor:{type:'validatebox',options:{required:true}}"></th>
                <th data-options="field:'PARENT_ID',title:'父级ID',width: 20,editor:{type:'combobox',options:{
                    valueField:'ID',
                    textField:'GROUP_NAME',
                    method:'get',
                    url: '/sysAdmin/teacher_group_manage/parentMenu',
                    editable:false
                }}"></th>
                <th data-options="field:'GROUP_CODE',title:'组code',editor:{type:'validatebox'}"></th>
                <th data-options="field:'GROUP_TYPE',title:'组类型',editor:{type:'combobox',options:{required:true,data: [{'value':'sys','text':'系统组'},{'value':'custom','text':'自定义组'}]}},formatter: function(value,row,index) {
                    if(value == 'sys') return '系统组';
                    else return '自定义组';
                }"></th>
                <th data-options="field:'WEIGHT',title:'顺序',width:10,editor:{type:'numberbox',options:{required:true}}"></th>
                <th data-options="field:'IDS',title:'身份',width: 20,editor:{type:'combobox',options:{
                    valueField:'ID',
                    textField:'POSITION',
                    groupField:'DEPART',
                    onBeforeLoad:function(param){
                        var r = $('#teacher_group_managedg').datagrid('getSelected');
                        param.groupCode = r.GROUP_CODE;
                    },
                    url: '/sysAdmin/teacher_group_manage/organizeGroup',
                    multiple:true,
                    editable:false,
                    required:true
                }},formatter(value,row,index) {
                    return '<span class=\'note\' title=\''+row.positionText+'\'>'+ row.positionText + '</span>';
                }"></th>
            </tr>
        </thead>
    </table>
    <script type="text/javascript">
        var url = "/sysAdmin/teacher_group_manage";
        $(function(){
            initDatagridAdmin("teacher_group_manage",url,0,0,1,1,0,1);
        })
    </script>

</body>
</html>